package org.mistlab
{
import flash.display.Sprite;
import org.papervision3d.objects.parsers.DAE;
import org.papervision3d.objects.DisplayObject3D;
import org.papervision3d.core.geom.renderables.Line3D;
import org.papervision3d.core.geom.Lines3D;
import uint;
import flash.events.Event;
import org.papervision3d.core.math.Matrix3D;
import org.papervision3d.materials.BitmapMaterial;
import org.papervision3d.materials.utils.MaterialsList;
import org.papervision3d.materials.BitmapFileMaterial;
import org.mistlab.models.Building;
import org.mistlab.models.Tree;

    public class RAIDemo extends DisplayObject3D
    {
	
	    private var _building:Building = new Building();
	    private var _trees:Vector.<Tree> = new Vector.<Tree>();
	    
    	public function RAIDemo()
    	{
    		super();
    		    		
            addChild(_building);      
    		_trees.push(addChild(new Tree()) as Tree);
    		_trees.push(addChild(new Tree()) as Tree);
    		_trees.push(addChild(new Tree()) as Tree);
    		_trees.push(addChild(new Tree()) as Tree);
    		_trees.push(addChild(new Tree()) as Tree);
    		_trees.push(addChild(new Tree()) as Tree);
    		_trees.push(addChild(new Tree()) as Tree);
            
            _trees[0].z = 280;
            _trees[0].x = 150;
            
            _trees[1].z = 50;
            _trees[1].x = 300;

            _trees[2].z = -150;
            _trees[2].x = 500;
            
            /*addEventListener(Event.ENTER_FRAME, renderTrees);*/
    		
    	}
    	
    	public function get building():Building
    	{
    	   return _building;
    	}
    	
    	public function renderTrees(m:Matrix3D):void
    	{
            
    	}
    }

}